///////////////////////////////////////////////////////////////////////////////
//
// Lynxmotion SSC-32 Servo Controller Service
//
// Based on code from the Lynxmotion web site arm.1.2.zip
// Modified with the permission of Lynxmotion
//
// Updated Nov-2007 by Trevor Taylor, Software Technology
//
// This code is Open Source
//
// Contract Identifier and Namespace modified in Feb 2008 to avoid a conflict
// with the CoroWare ClassPack which also includes an SSC-32 service
//
///////////////////////////////////////////////////////////////////////////////

using Microsoft.Ccr.Core;
using Microsoft.Dss.ServiceModel.Dssp;
using Microsoft.Dss.Core.DsspHttp;
using System;
using System.Collections.Generic;

using System.ComponentModel;

using W3C.Soap;

namespace ProMRDS.Robotics.Lynxmotion.Ssc32
{
    
    public static class Contract
    {
        public const string Identifier = "http://www.promrds.com/contracts/2008/01/ssc32.html";
    }
    public class SSC32Operations : PortSet<
        DsspDefaultLookup, 
        DsspDefaultDrop, 
        Get, 
        HttpGet,  
        HttpPost,
        SendSSC32Command>
    {
    }
    [DisplayName("Get")]
    [Description("Gets the SSC32 board's current state.")]
    public class Get : Get<GetRequestType, PortSet<SSC32State, Fault>>
    {
    }
    [DisplayName("SendCommand")]
    [Description("Sends a command to the SSC32 board.")]
    public class SendSSC32Command : Submit<SSC32Command, PortSet<SSC32ResponseType, Fault>>
    {
        public SendSSC32Command() { }
        public SendSSC32Command(SSC32Command cmd)
        {
            this.Body = cmd;
        }
    }
}
